#
# Copyright (C) 2013 Will Dignazio
#

ifndef ROOTDIR
	ROOTDIR = ..
	CC = clang
	CFLAGS = -I $(ROOTDIR)/include
endif

LIBS = -lcurl -lpthread
CSRC = client.c \

COBJ	= $(CSRC:.c=.o)
CLIBS	= $(ULIBS:=.a)

export ROOTDIR
export CFLAGS
export CC

.PHONY: clean

client: $(CSRC) client.o ../libsocketio.a
	$(CC) $(CFLAGS) $(LIBS) -o client client.o $(ROOTDIR)/libsocketio.a

%.o: %.c
	$(CC) $(CFLAGS) -c -o $@ $<

clean:
	rm -f client
	rm -f *.a
	rm -f *.o
